<template>
	<div>Home</div>
	<p>{{ count }}</p>
	<button @click="setCount(2)">更新</button>
</template>

<script>
import { mapState, mapActions } from 'vuex'
export default {
	name: 'Home',
	computed: {
		...mapState({
			count: (state) => state.home.count,
		}),
	},
	methods: {
		...mapActions('home', ['setCount']),
	},
}
</script>

<style></style>
